﻿// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com

// ReSharper disable CheckNamespace
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable CommentTypo
// ReSharper disable IdentifierTypo
// ReSharper disable InconsistentNaming
// ReSharper disable StringLiteralTypo
// ReSharper disable UnusedParameter.Local

/* LineBreakClass.cs --
 * Ars Magna project, http://arsmagna.ru
 */

namespace AM.Skia.RichTextKit;

/// <summary>
/// Unicode line break classes
/// </summary>
/// <remarks>
/// Note, these need to match those used by the JavaScript script that
/// generates the .trie resources
/// </remarks>
internal enum LineBreakClass
{
    // The following break classes are handled by the pair table
    OP = 0, // Opening punctuation
    CL = 1, // Closing punctuation
    CP = 2, // Closing parenthesis
    QU = 3, // Ambiguous quotation
    GL = 4, // Glue
    NS = 5, // Non-starters
    EX = 6, // Exclamation/Interrogation
    SY = 7, // Symbols allowing break after
    IS = 8, // Infix separator
    PR = 9, // Prefix
    PO = 10, // Postfix
    NU = 11, // Numeric
    AL = 12, // Alphabetic
    HL = 13, // Hebrew Letter
    ID = 14, // Ideographic
    IN = 15, // Inseparable characters
    HY = 16, // Hyphen
    BA = 17, // Break after
    BB = 18, // Break before
    B2 = 19, // Break on either side (but not pair)
    ZW = 20, // Zero-width space
    CM = 21, // Combining marks
    WJ = 22, // Word joiner
    H2 = 23, // Hangul LV
    H3 = 24, // Hangul LVT
    JL = 25, // Hangul L Jamo
    JV = 26, // Hangul V Jamo
    JT = 27, // Hangul T Jamo
    RI = 28, // Regional Indicator
    EB = 29, // Emoji Base
    EM = 30, // Emoji Modifier
    ZWJ = 31, // Zero Width Joiner
    CB = 32, // Contingent break

    // The following break classes are not handled by the pair table
    AI = 33, // Ambiguous (Alphabetic or Ideograph)
    BK = 34, // Break (mandatory)
    CJ = 35, // Conditional Japanese Starter
    CR = 36, // Carriage return
    LF = 37, // Line feed
    NL = 38, // Next line
    SA = 39, // South-East Asian
    SG = 40, // Surrogates
    SP = 41, // Space
    XX = 42, // Unknown
}
